package com.hfh.io;

import org.junit.Test;

import java.nio.charset.StandardCharsets;
import java.util.concurrent.CyclicBarrier;

public class CodeDemo {
    @Test
    public void test(){
        byte[] arr = {98,97};
        String str = new String(arr);
        System.out.println(str);
    }

    public static void main(String[] args) {
        String str = "abcd";
        System.out.println(str.getBytes());
        System.out.println(str.getBytes(StandardCharsets.UTF_8));
    }
}
